package com.jgc.stage01.实现线程方式;

import java.util.concurrent.Callable;

/**
 * Created by Administrator on 2022/2/10.
 */
public class MyCallable implements Callable<Integer>{
    private int num = 1;

    public MyCallable(int num) {
        this.num = num;
    }

    @Override
    public Integer call() throws Exception {
        System.out.println("开始运行" + this.getClass());
        Thread.sleep(3000);
        return num + 1;
    }
}
